Skip to content

Conversation

6543
Copy link
Member

@6543 6543 commented Oct 1, 2025

As most users just copy the example code and the wonder why it did not work ... befor even thinking the shell vars in the example need to be filled with the info below ... just show them. and if there is no selection just return the only options directly

multible

image

only one option available

image

mixed

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 1, 2025
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Oct 1, 2025
@6543 6543 added topic/ui Change the appearance of the Gitea UI topic/ux How users interact with Gitea type/enhancement An improvement of existing functionality topic/packages and removed modifies/templates This PR modifies the template files labels Oct 1, 2025
@silverwind
Copy link
Member

silverwind commented Oct 2, 2025

I'd make the variables uppercase, this is a common practice in shell scripts. For the variables I would do:

DISTRIBUTION="alpine" # "alpine", "other", "another"
COMPONENT="edge" # "edge", "other", "another"

The benefit is the script will work when copied, and it should be obvious what the options are.

Also, it'd be nice if we could syntax-highlight these instructions as bash, but doesn't have to be this PR.

@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Oct 3, 2025
@6543 6543 requested a review from silverwind October 3, 2025 00:32
@silverwind
Copy link
Member

silverwind commented Oct 3, 2025

Can you remove the two # please select one: lines and the empty line between vars? It's obvious enough imho. I you want, you can add one of: a, b, c on the remaining comments.

@6543
Copy link
Member Author

6543 commented Oct 3, 2025

remaining comments?

what exactly do you propose, sorry dont get it rigt now :/

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 6, 2025
@6543
Copy link
Member Author

6543 commented Oct 7, 2025

@silverwind you might wana re-review as some bits changed:

  • tryed syntax highliting - did not work (reverted)
  • fixed intendation
  • removed and added translation

@6543
Copy link
Member Author

6543 commented Oct 7, 2025

-> screenshots updated to current pull state

@silverwind
Copy link
Member

Looks ok, I would add a empty line after the COMPONENT line, just to visually distinguish variables from commands.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Oct 7, 2025

Looks ok, I would add a empty line after the COMPONENT line, just to visually distinguish variables from commands.

Maybe it's even better to generate the texts from backend (Golang):

  • It's easier to maintain than template (the template syntax is hard to read when the logic is complex or we need some special formats)
  • It can add some tests to see what we want for various cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/templates This PR modifies the template files modifies/translation topic/packages topic/ui Change the appearance of the Gitea UI topic/ux How users interact with Gitea type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants